{
Function:       _LastBarOnChart

Description:    LastBarOnChart does not become true on real-time charts with BarType > 0
                until the first tick of data arrives AFTER the last bar has printed on
                the chart.
                
                If LastBarOnChart is being used to trigger the display of an indicator or 
                performance of a calculation, this delay may not be tolerable in infrequently
                trading symbols.
                
                This function becomes true immediately after the last bar has printed on a
                real-time chart of BarType > 0.
                
                In addition to working on intraday, daily, weekly and monthly bars, it also works
                on share, Kagi, Kase, LineBreak, Momentum, Point and Figure, Range and Renko charts.
                
                As with the original LastBarOnChart function, it does NOT work correctly with tick or 
                volume charts.
                
                Code modified from in-line Wiki code.

Author:         MarkSanDiego

Updated:        01/19/10    original version  
				11/27/12	adopted Goose's latest version              
                
}
        
Vars:    
	IntrabarPersist LastBar(False);

	if LastBar = false then
			LastBar = GetAppInfo( aiRealTimeCalc ) = 1 or 
				( LastCalcDateTime.ELDateTimeEX = BarDateTime[0].ELDateTimeEX ) ;

	_LastBarOnChart = LastBar;
